package com.invexer.common.puremvc.patterns.facade {
import org.puremvc.as3.multicore.interfaces.IMediator;
import org.puremvc.as3.multicore.interfaces.IProxy;
import org.puremvc.as3.multicore.patterns.facade.Facade;

public class InvexerSimpleFacadeBase extends Facade {
	public function InvexerSimpleFacadeBase(key:String){
		super(key);
	}

	override public function registerMediator(mediator:IMediator):void{
		if(hasMediator(mediator.getMediatorName()))
			removeMediator(mediator.getMediatorName())
		super.registerMediator(mediator);
	}


	override public function registerCommand(notificationName:String, commandClassRef:Class):void{
		if(hasCommand(notificationName))
			removeCommand(notificationName);
		super.registerCommand(notificationName,commandClassRef);
	}

	override public function registerProxy(proxy:IProxy):void{
		if(hasProxy(proxy.getProxyName()))
			removeProxy(proxy.getProxyName());
		super.registerProxy(proxy);
	}
}
}